package com.kefu.call.vo;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractInsertVo;
import com.kefu.call.model.CallInnumber;
import cn.hutool.core.util.IdUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * @author CodeGenerator
 * @date 2022/07/24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "呼入号码")
public class CallInnumberInsertVo extends AbstractInsertVo<CallInnumber> {

    
    @ApiModelProperty(value = "呼入号码")
    @NotEmpty
    private String callnumber;
    
    @ApiModelProperty(value = "说明")
    private String remarks;

    @ApiModelProperty(value = "创建人")
    private String createName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Override
    public CallInnumber convert() {
        CallInnumber info = new CallInnumber();
	    info.setCallnumber(callnumber);
	    info.setRemarks(remarks);
        KefuContext context = KefuContext.getKefuContext();
		info.setCreateName(context.getUserName());
        info.setCreateTime(DateUtil.date());
	    return info;
	}
}